﻿namespace Digitalmes.Domain.Mes;

/// <summary>
/// 工艺路线
/// </summary>
[SugarTable("proc_routing", "工艺路线表")]
public class ProcRouting : EntityBase
{
    /// <summary>
    /// 产线 Id
    /// </summary>
    [SugarColumn(ColumnDescription = "产线Id")]
    public long LineId { get; set; }

    /// <summary>
    /// 产线代码
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "产线代码", Length = 32)]
    public string? LineCode { get; set; }

    /// <summary>
    /// 工艺路线编号（编号唯一，不分产线）
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "工艺路线编号", Length = 32)]
    public string? RoutingCode { get; set; }

    /// <summary>
    /// 工艺路线名称
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "工艺路线名称", Length = 32)]
    public string? RoutingName { get; set; }

    /// <summary>
    /// 工艺路线明细项
    /// </summary>
    [NotNull]
    [Navigate(NavigateType.OneToMany, nameof(ProcRoutingItem.RoutingId))]
    public List<ProcRoutingItem>? RoutingItems { get; set; }
}
